#include "public.h"

void delay(uint n) {
	uint i;
	while(n--)
		for(i=0; i<628; i++);
}

void sys_init() {
	P2 = (P2 & 0x1F) | 0x80;
	P0 = 0xFF; //关闭LED
	P2 &= 0x1F;
	P2 = (P2 & 0x1F) | 0xA0;
	P0 = 0x00; //关闭外设
	P2 &= 0x1F;
}